package com.qf.kk.dao.Daoimpl;
/*
 *@author KK on 2022.09.12 10:54
 */

import com.qf.kk.entity.Emp;

import java.sql.SQLException;


public class EmpDao extends BaseDao<Emp> {
    private String base_clo = " eno,ename,esex,salary,pwd,dno,born_date bornDate ";

    //通过用户名查询数据
    public Emp getEmpByName(String username){
        try {
            //通过名字查询是否存在该对象
            String sql = "select"+base_clo+"from emp where ename = ?";
            return query(sql, username);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }
}
